package com.winit.beetleAuth.repository;

import com.winit.beetleAuth.model.User;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;

@Repository
public class UserRepositoryExt {
    @PersistenceContext
    private EntityManager entityManager;
    @Transactional
    public void updateUser(User user){
        this.entityManager.merge(user);
        entityManager.flush();
    }
}
